package router

import (
	"gitee.com/dehow/k8sdev/api"
	"github.com/gin-gonic/gin"
)

func LoadWebRootRoutes(engine *gin.Engine) {
	engine.GET("/health", api.Health)
}

func LoadPublicRoutes(engine *gin.Engine) {
	gPub := engine.Group("pub")
	gPub.GET("/ping", func(c *gin.Context) { api.NewSystemApi(c).Ping(c) })
	gPub.GET("/hostname", func(c *gin.Context) { api.NewSystemApi(c).Hostname(c) })
	gPub.GET("/data_example", func(c *gin.Context) { api.NewSystemApi(c).DataExample(c) })
	gPub.GET("/num", func(c *gin.Context) { api.NewSystemApi(c).Num(c) })
	gPub.GET("/req_id", func(c *gin.Context) { api.NewSystemApi(c).ReqId(c) })
	gPub.GET("/ctx_end", func(c *gin.Context) { api.NewSystemApi(c).CtxEnd(c) })

	gOrder := engine.Group("order")
	gOrder.GET("/order_info", func(c *gin.Context) { api.NewOrderApi(c).GetOrderInfo(c) })

}
